from tkinter import *
root = Tk()
root.title("CHIEFKIEF")
root.geometry("500x500")
canvas = Canvas(bg="black", width=1500, height=1500)
canvas.pack(anchor=CENTER, expand=1)
x=30
y=30
N=4
coords = [10,0,20,0,20,10,30,10,30,30,30,30,20,20,10,20,10,10,10,0]
for i in range(len(coords)):
    coords [i] *=N
for i in range(len(coords)):
    if i%2==0:
        coords[i]+=x
    else:
        coords[i]+=y
f=1
for x in coords:
    if not(0<=x<=500):
        f=0
        break
if f:
    canvas.create_polygon(coords,fill="#000000",outline="#ffffff")
    root.mainloop()
else:
    print("Выходит")
